package com.xzx.list;

/**
 * @author xinzhixuan
 * @version V1.0.0
 * @date 2021/3/14
 **/
public class TestList {
    public static void main(String[] args) {
//        List list = new ArrayList().makeEmpty();
        List list = new LinkedList().makeEmpty();
//        list.delete(1);

        System.out.println(list.length());
        list.insert(1, 0);
        System.out.println(list.length());
        System.out.println(list.toString());
        list.insert(2, 0);
        System.out.println(list.length());
        System.out.println(list.toString());
        list.insert(3, 0);
        list.insert(4, 1);
        list.insert(5, 0);
        list.insert(6, 0);
        list.insert(7, 0);
        list.insert(8, 0);
        list.insert(9, 0);
        list.insert(10, 9);
//        list.insert(11, 9);
        System.out.println(list.length());
        System.out.println(list.toString());

        Integer kth = list.findKth(5);
        System.out.println(kth);

        list.delete(5);
        System.out.println(list.length());
        System.out.println(list.toString());

//        list.insert(10, 10);
//        System.out.println(list.length());
//        System.out.println(list.toString());

    }
}
